#include "circle.h"

void Circle::setCenter(Point p) {
    this->center.setX(p.getX());
    this->center.setY(p.getY());
}

void Circle::setRadius(double radius) {
    this->radius = radius;
}

Point Circle::getCenter() {
    return this->center;
}

double Circle::getRadius() {
    return this->radius;
}

bool Circle::containPoint(Point p) {
    return (p.getX() - this->center.getX()) * (p.getX() - this->center.getX()) + (p.getY() - this->center.getY()) * (p.getY() - this->center.getY()) <= this->radius * this->radius;
}